package cn.edu.scau.cmi.yanweijie.comprehensiveExperimentFxml;


import cn.edu.scau.cmi.yanweijie.client.*;
import cn.edu.scau.cmi.yanweijie.client.NormalFactoryClient;
import cn.edu.scau.cmi.yanweijie.client.SimpleFactoryClient;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.stage.Stage;

public class ComprehensiveMyController {
public ComprehensiveMyController() {
		
	}
	
	@FXML
	private Label fxmllabel;
	
	public Button getButton() {
		return button;
	}


	public void setButton(Button button) {
		this.button = button;
	}


	public TextArea getArea() {
		return area;
	}


	public void setArea(TextArea area) {
		this.area = area;
	}


	public ComboBox getMenu() {
		return menu;
	}


	public void setMenu(ComboBox menu) {
		this.menu = menu;
	}

	@FXML
	private Button button;
	
	@FXML
	private TextArea area;
	
	@FXML
	private ComboBox menu;
	
	@FXML
	private Label picture;
	
	public Label getPicture() {
		return picture;
	}


	public void setPicture(Label picture) {
		this.picture = picture;
	}


	public Label getFxmllabel() {
		return fxmllabel;
	}


	public void setFxmllabel(Label fxmllabel) {
		this.fxmllabel = fxmllabel;
	}
	@FXML
	private void eventAction1(ActionEvent event)
	{
		System.out.println("实验一：接口编程");
		InterProgrammingClient.main(null);
		
	}

	@FXML
	private void eventAction2(ActionEvent event) throws Exception
	{
		System.out.println("实验二：单例模式");
		
		SingletonClient.main(null);
	}

	@FXML
	private void eventAction3(ActionEvent event) throws Exception
	{
		System.out.println("实验二：多例模式");
		SingletonClient.main(null);
		
	}

	@FXML
	private void eventAction4(ActionEvent event)
	{
		System.out.println("实验三：简单工厂");
		SimpleFactoryClient.main(null);
		
		
	}

	@FXML
	private void eventAction5(ActionEvent event)
	{
		System.out.println("实验三：工厂模式");
		NormalFactoryClient.main(null);
		
	}

	@FXML
	private void eventAction6(ActionEvent event)
	{
		System.out.println("实验三：抽象工厂");
		AbstractFactoryClient.main(null);
				
	}

	@FXML
	private void eventAction7(ActionEvent event)
	{
		System.out.println("实验四：安全组合");
		CombinationClient.main(null);
		//System.out.println("6666666666666");
		//area.appendText("666");
		//area.appendText((String) menu.getValue()+"\n");
		
	}
	
	@FXML
	private void eventAction8(ActionEvent event)
	{
		System.out.println("实验四：一致组合");
		CombinationClient.main(null);
		//System.out.println("6666666666666");
		//area.appendText("666");
		//area.appendText((String) menu.getValue()+"\n");
		
	}

	@FXML
	private void eventAction9(ActionEvent event)
	{
		System.out.println("实验五：类适配器/对象适配器");
        AdapterClient.main(null);
		
	}
	
	@FXML
	private void eventAction10(ActionEvent event) throws InterruptedException
	{
		System.out.println("实验六：Mybatis");
        JdbcClient.main(null);
		//System.out.println("6666666666666");
		//area.appendText("666");
		//area.appendText((String) menu.getValue()+"\n");
		
	}
	
	@FXML
	private void eventAction11(ActionEvent event)
	{
		System.out.println("实验七：毕业答辩");
        SpringJdbcClient.main(null);
		//System.out.println("6666666666666");
		//area.appendText("666");
		//area.appendText((String) menu.getValue()+"\n");
		
	}
	
	@FXML
	private void eventAction12(ActionEvent event)
	{
		System.out.println("实验七：Spring+Hibernate+DAO");
        SpringJdbcClient.main(null);
		//System.out.println("6666666666666");
		//area.appendText("666");
		//area.appendText((String) menu.getValue()+"\n");
		
	}

	@FXML
	private void initialize() {
		System.out.println("初始化完成！");
	}
}
